import request from '@/utils/request'

const prefixUrl = 'app/captcha/'

/**
   * 获取图片验证码
   * @param data
   */
export function get_image_code(){
  return request({
    url: prefixUrl+`image`,
    method: 'post',
    responseType: 'arraybuffer'
  })
}

/**
 * 检查图片验证码
 * @param data
 */
export function check_send_sms(data){
  return request({
    url: prefixUrl+`image/check_send_sms`,
    method: 'post',
    data,
	content_type: 'json'
  })
}

/**
 * 请求发送短信验证码
 * @param data
 */
export function send_sms(data){
  return request({
    url: prefixUrl+`send_sms`,
    method: 'post',
    data,
	content_type: 'json'
  })
}